<template>
    <view id="myView">
        <view>{{num}}</view>
        <view>{{title}}</view>
        <view>
            <button type="primary" @click="sendNum"></button>
        </view>
    </view>
</template>

<script>
export default{
    data(){
        return{
            num:3,
            intId:null
        }
    },
    props:['title','name'],
    methods:{
        sendNum(){
            console.log('给父组件传值')
            this.$emit('myEven', this.num)
        }
    },
    beforeCreste(){
        console.log('初始化')
        console.log(this.num)
    }
}
</script>